arm,smmu: match start level of page table walk with P2M
authorLaurentiu Tudor <laurentiu.tudor@nxp.com>
Fri, 2 Oct 2020 10:33:44 +0000 (13:33 +0300)
committerStefano Stabellini <sstabellini@kernel.org>
Fri, 6 Nov 2020 01:49:54 +0000 (17:49 -0800)
commit29b48aa27de1a40be45cb5ccd6e427ad63992ff3
tree95c917333fa6b37dffe567192e7aea3104c846bd
parentd131310e60828a15f1354f0d73a89f42b64fe810
arm,smmu: match start level of page table walk with P2M

Don't hardcode the lookup start level of the page table walk to 1
and instead match the one used in P2M. This should fix scenarios
involving SMMU where the start level is different than 1.
In order for the SMMU driver to also compile on arm32 move the
P2M_ROOT_LEVEL in the p2m header file (while at it, for
consistency also P2M_ROOT_ORDER) and use the macro in the smmu
driver.

Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Acked-by: Julien Grall <jgrall@amazon.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
(cherry picked from commit 9ae1197582798b394d696cff94c4d742319bdbbf)
xen/arch/arm/p2m.c
xen/drivers/passthrough/arm/smmu.c
xen/include/asm-arm/p2m.h